home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / SELECT-2.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  2KB  |  51 lines

  1. ' SELECT-2.BAS
  2. ' This program demonstrates the use of CASE ELSE.
  3.  
  4. CLS
  5.  
  6. PRINT "Welcome to Golden-Age Television Trivia!"
  7. PRINT "In what year did the top-rated show"
  8. PRINT "I Love Lucy first appear on television?"
  9. PRINT
  10. INPUT "Please enter a year from 1950 to 1959:  ", year%
  11. PRINT
  12.  
  13. SELECT CASE year%
  14.     CASE 1950
  15.         PRINT "Incorrect.  In 1950, the popular show"
  16.         PRINT "Your Show of Shows made its television debut."
  17.     CASE 1951
  18.         PRINT "Correct!  I Love Lucy first aired in October 1951."
  19.         PRINT "From 1952 through 1954 it was the most popular"
  20.         PRINT "television show in the United States."
  21.     CASE 1952
  22.         PRINT "Incorrect.  In 1952, the popular show"
  23.         PRINT "Dragnet made its television debut."
  24.     CASE 1953
  25.         PRINT "Incorrect.  In 1953, the popular show"
  26.         PRINT "Name That Tune made its television debut."
  27.     CASE 1954
  28.         PRINT "Incorrect.  In 1954, the popular show"
  29.         PRINT "Lassie made its television debut."
  30.     CASE 1955
  31.         PRINT "Incorrect.  In 1955, the popular show"
  32.         PRINT "Gunsmoke made its television debut."
  33.     CASE 1956
  34.         PRINT "Incorrect.  In 1956, the popular show"
  35.         PRINT "Playhouse 90 made its television debut."
  36.     CASE 1957
  37.         PRINT "Incorrect.  In 1957, the popular show"
  38.         PRINT "Leave it to Beaver made its television debut."
  39.     CASE 1958
  40.         PRINT "Incorrect.  In 1958, the popular show"
  41.         PRINT "Peter Gunn made its television debut."
  42.     CASE 1959
  43.         PRINT "Incorrect.  In 1959, the popular show"
  44.         PRINT "The Twilight Zone made its television debut."
  45.     CASE ELSE
  46.         PRINT "You did not enter a number between 1950 and 1959."
  47.         PRINT "Please run the program again and enter an"
  48.         PRINT "appropriate value."
  49. END SELECT
  50.  
  51.